package de.tum.se.sudoku.gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import de.tum.se.sudoku.impl.SolverStrategys;

public class SolStratComboBoxListener implements ActionListener {
	private IGui gui;

	public SolStratComboBoxListener(IGui gui) {
		this.gui = gui;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		SolStratComboBox selected = (SolStratComboBox) e.getSource();
		gui.setSolver(SolverStrategys.retSolver((String) selected.getSelectedItem()));
		//debug
		System.out.println("The new solving strategy is " + (String) selected.getSelectedItem());
	}
}
